﻿using System;
using System.Collections.Generic;
using System.Web;

namespace gamexpert
{
    public class TopMenuBar
    {
        menuType _menuType;
        public TopMenuBar()
        {
            _menuType = menuType.None;
        }
        // Declare the delegate (if using non-generic pattern).
        public delegate void TopMenuBarChangeEventHandler(object sender, TopMenuBarChangeEventArgs e);
        // Declare the event.
        public event TopMenuBarChangeEventHandler TopMenuBarChangeEvent;

        public menuType MenuStatus
        {
            get { return _menuType; }
            set { 
                    _menuType = value;
                    TopMenuBarChangeEvent(this, new TopMenuBarChangeEventArgs("MenuStatusChanged"));
                }
        }
        public void fireTopMenuBarChangeEvent()
        {
            TopMenuBarChangeEvent(this, new TopMenuBarChangeEventArgs("Manual Fire MenuStatusChanged"));
        }
    }
    public class TopMenuBarChangeEventArgs
    {
        public TopMenuBarChangeEventArgs(string s) { Text = s; }
        public String Text { get; private set; } // readonly
    }
}
